Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix potential deadlock if open_loop() is cancelled #128

Merged
merged 2 commits into from
Dec 1, 2023

Conversation

oremanj
Copy link
Member

@oremanj oremanj commented Dec 1, 2023

Resolves #115. This also modifies the "cancel and await all asyncio tasks" logic to run even if open_loop() is cancelled or sees an exception, because that's another potential source of deadlocks -- the Trio tasks in the tasks_nursery might need to block on asyncio work as they unwind.

@tjstum
Copy link
Member

tjstum commented Dec 1, 2023

Nice fix.

LGTM

@tjstum tjstum merged commit 7712c98 into python-trio:master Dec 1, 2023
25 checks passed
@oremanj oremanj deleted the fix-startup-deadlock branch February 1, 2024 19:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

trio_asyncio shielding cancellation causes errors to be silenced.
2 participants